import { TimeObserver } from "./TimeObserver";

export class TimerShedule extends TimeObserver {
    protected temp: number = 0;
    check(dt: number) {
        this.temp += dt;
        if (this.temp >= this.duration) {
            this.temp -= this.duration
            if (this.func) {
                this.func(this.duration);
            }
            return true
        }
        return false;
    }
}